using namespace std;
#include <iostream>
#include<unistd.h>
#include "pthreadpool.hpp"
int num=0;
void fun()
{
    cout << "我是一个任务" << num << endl;
    num++;
}
int main()
{
    using func=function<void()>;
    func t1=fun;
    ThreadPool<func> tp1;
    while(1)
    {
    tp1.PushTask(fun);
    tp1.PushTask(fun);
    tp1.PushTask(fun);
    tp1.PushTask(fun);
    tp1.PushTask(fun);
    tp1.Start();
    sleep(1);
    }

}